for
Runs a command for each file in a set of files.
for %variable in (set) do command [options]
for %%variable in (set) do command [options]
The first format is for use on the command line, the second
is for use in batch files.
Options
%variable or %%variable
A name for the parameter that will be replaced with each file name.
(set)
The set of files.
Wildcards * and ? may be used.
command
The command to run for each file.
options
These options are passed to the command.
Example
Displays all the text files in the current directory, one after another:
for %f in (*.txt) more %f
See Also
batch files
Copyright © 2003 Rob Platt
This file forms part of The FreeDOS HTML Help Documentation, and is covered
under its terms: see index.htm